/*    */ package eos.moe.dragoncore;
/*    */ 
/*    */ import java.util.Collection;
/*    */ import java.util.function.Function;
/*    */ import net.minecraft.client.renderer.texture.TextureAtlasSprite;
/*    */ import net.minecraft.util.ResourceLocation;
/*    */ import net.minecraftforge.client.model.IModel;
/*    */ import net.minecraftforge.client.model.ModelLoader;
/*    */ import net.minecraftforge.client.model.ModelLoaderRegistry;
/*    */ 
/*    */ 
/*    */ 
/*    */ public class cm
/*    */   implements Function<ResourceLocation, TextureAtlasSprite>
/*    */ {
/* 16 */   public static final cm g = new cm();
/*    */ 
/*    */ 
/*    */   
/*    */   public TextureAtlasSprite v(ResourceLocation resourceLocation) {
/* 21 */     hw hw = hw.v(resourceLocation.func_110623_a());
/* 22 */     if (hw.isLoaded())
/*    */     {
/* 24 */       return hw.toATextureCIItem();
/*    */     }
/*    */     
/* 27 */     IModel iModel = ModelLoaderRegistry.getMissingModel();
/* 28 */     if (iModel != null) {
/* 29 */       Collection<ResourceLocation> collection = iModel.getTextures();
/* 30 */       if (!collection.isEmpty()) resourceLocation = collection.iterator().next();
/*    */     
/*    */     } 
/* 33 */     return ModelLoader.defaultTextureGetter().apply(resourceLocation);
/*    */   }
/*    */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\cm.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */